/*
 * Performs an XMLHttpRequest to Twitter's API to get trending topics.
 *
 * @param callback Function If the response from fetching url has a
 *     HTTP status of 200, this function is called with a JSON decoded
 *     response.  Otherwise, this function is called with null.
 */

  
console.log("content");
var brandStory = $(".shop-tab-brandstory").find(".J_all").text();
var shopName = $("title").text();
var environmentPhoto = [];
$(".shop-tab-photos").find("img").each(function(){
  environmentPhoto.push($(this).attr("src"));
});

console.log(environmentPhoto);

chrome.runtime.sendMessage({
  brandStory: brandStory,
  shopName: shopName,
  environmentPhoto: environmentPhoto
});